#ifndef ITEMWIDGET_H
#define ITEMWIDGET_H

#include <QWidget>
#include <QStyle>
#include <QDebug>
#include <QStyleOption>

#include "../basewidgets/basewidget.h"
#include "common.h"
#include "qpainter.h"
#include "observer/globalobserver.h"

class ItemWidget : public BaseShowWidget
{
    Q_OBJECT
public:
    explicit ItemWidget(CabPosItem cab_pos_item, int screen_id, int partition_id, int layout_id, int item_id, QString cab_pos_item_str, BaseShowWidget *parent = 0);
    void setAllChildrenLossSelect();
    void setSelectStyle(bool select);
    void loadAttribute(CabPosItem cab_pos_item);

private:
    int m_screen_id;
    int m_partition_id;
    int m_layout_id;
    int m_item_id;
    QString m_cab_pos_item_str;
    CabPosItem m_cab_pos_item;
};

#endif // ITEMWIDGET_H
